package com.zhdl.network.common_client.dto;

import com.project.common.bean.FrameDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.tio.core.intf.Packet;

import java.io.Serial;

/**
 * modbus 协议的 packet
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class CommonClientPacket extends Packet implements FrameDto {
    public static final String CHARSET = "utf-8";
    @Serial
    private static final long serialVersionUID = -172060606924066412L;
    /**
     * 数据单元，接收时拼出的单元数据
     */
    private byte[] unitBuff;

    /**
     * 完整数据包，发送时有值，接收时为null
     */
    private byte[] fullBuff;

    /**
     * 正常功能码
     */
    private String resCode;
}
